﻿@model IEnumerable<Arbalest.Models.Company>

<h2>Company List</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>


<table class="neat">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Name)
            </th>
            <th class="Type_@Model.First().CreatedDateTime.GetType().ToString().Replace("System.", string.Empty)">
                @Html.DisplayNameFor(model => model.CreatedDateTime)
            </th>
            <th></th>
        </tr>
    </thead>
    
    <tbody>
    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CreatedDateTime)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
                @Html.ActionLink("Details", "Details", new { id=item.Id }) |
                @Html.ActionLink("Delete", "Delete", new { id=item.Id })
            </td>
        </tr>
    }
    </tbody>
</table>
